#!/bin/bash

if [ -z "$1" ]; then
    echo "error : please send a filename"
    exit 1;
fi

file="$1"

if [ ! -e "$file" ]; then
    echo "error : file not exist"
elif [ ! -x "$file" ]; then
    echo "error : file can not execute"
else
    echo "file exists and is executable"
fi

